#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        for (int dest = -1, cur = 0; cur < nums.size(); cur++) {
            if (nums[cur] != 0) {
                swap(nums[dest + 1], nums[cur]);
                dest++;
            }


        }

    }
};